package org.ala.tiktools_clickhouse_generator.generator.mapper;

import org.ala.tiktools_clickhouse_generator.config.ConfigInfo;
import org.ala.tiktools_clickhouse_generator.config.ConfigInfo.Author;
import org.ala.tiktools_clickhouse_generator.generator.AbstractInfo;
import org.ala.tiktools_clickhouse_generator.generator.dao.DaoInfo;
import org.ala.tiktools_clickhouse_generator.generator.entity.EntityInfo;
import org.ala.tiktools_clickhouse_generator.table.TableInfo;
import org.ala.tiktools_clickhouse_generator.tools.NameTools;
import org.ala.tiktools_clickhouse_generator.tools.TimeTools;

/**
 *
 *	@author ala
 *	@date 2025年6月9日
 */
public class MapperInfo extends AbstractInfo {
	
	/**
	 * 	类名，包名，创建时间
	 */
	protected String className, pkg, createTime;
	/**
	 * 	实体信息
	 */
	protected EntityInfo ei;
	/**
	 * 	Dao信息
	 */
	protected DaoInfo di;

	public MapperInfo(ConfigInfo.Mapper m, TableInfo tableInfo, Author author, EntityInfo ei, DaoInfo di) {
		super(tableInfo, author);
		
		pkg = m.getPkg();
		className = NameTools.upFirst(NameTools.hump(tableInfo.getName())) + m.getSuffix();
		createTime = TimeTools.formatNow();
		
		this.ei = ei;
		this.di = di;
	}

	public String getClassName() {
		return className;
	}

	public void setClassName(String className) {
		this.className = className;
	}

	public String getPkg() {
		return pkg;
	}

	public void setPkg(String pkg) {
		this.pkg = pkg;
	}

	public String getCreateTime() {
		return createTime;
	}

	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}

	public EntityInfo getEi() {
		return ei;
	}

	public void setEi(EntityInfo ei) {
		this.ei = ei;
	}

	public DaoInfo getDi() {
		return di;
	}

	public void setDi(DaoInfo di) {
		this.di = di;
	}
	
	

}
